﻿
import type { IFileAttachment, ISysOrg, ISysGroup, ISysJobPosition, ISysPerson } from '@/type/fileattachment'

export interface ISysHrOnboardingRequestBill {
  ID?: string | null;

  // 从SysPerson继承的字段 - 基本信息
  Name: string | null;
  StaffNo: string | null;
  BirthDate: Date | null;
  Age: number | null;
  Gender: number | string | null;
  Ethnicity: number | null;
  HighestEducation: number | null;
  MaritalStatus: number | null;
  PhotoId: string | null;
  Photo?: IFileAttachment;

  // 身份信息
  IdCardNo: string | null;
  IdCardFrontPhotoId: string | null;
  IdCardFrontPhoto?: IFileAttachment;
  IdCardBackPhotoId: string | null;
  IdCardBackPhoto?: IFileAttachment;
  IdCardExpiryDate: string | null;

  // 户籍信息
  HouseholdRegistration: string | null;
  NativePlace: string | null;

  // 政治面貌
  PoliticalStatus: number | null;
  PartyJoinDate: Date | null;
  PartyBranch: string | null;
  ArchiveLocation: string | null;
  ArchiveNo: string | null;
  ArchiveTransferOutDate: Date | null;
  ArchiveTransferInDate: Date | null;

  // 联系方式
  HomeAddress: string | null;
  Phone: string | null;
  Email: string | null;

  // 银行账户
  SalaryBank: string | null;
  SalaryAccount: string | null;
  BonusBank: string | null;
  BonusAccount: string | null;

  // 工作信息
  OrgId: string | null;
  Org?: ISysOrg;
  GroupId: string | null;
  Group?: ISysGroup;
  JobPositionId: string | null;
  JobPosition?: ISysJobPosition;
  ResumeId: string | null;
  Resume?: IFileAttachment;
  JoinWorkDate: Date | null;
  HireDate: Date | null;
  WorkYears: number | null;
  EmploymentType: number | null;
  ContractType: number | null;
  ContractNo: string | null;
  ContractStartDate: Date | null;
  ContractEndDate: Date | null;
  ResignationDate: Date | null;
  ResignationReason: string | null;
  ResignationType: number | null;

  // 其他
  BloodType: number | null;
  Hobbies: string | null;

  // 从BasePersonBill继承的字段
  BillCode: string | null;
  BillStatus: number | null | string;
  WorkflowStatus: number | null | string;
  Remark: string | null;
  Approver: string | null;
  ApprovalTime: Date | null;

  // 入职申请单特有字段
  ExpectedStartDate: Date | null;
  PersonMedicalId: string | null;
  PersonMedical?: ISysPersonMedical;
  SysPersonTrainExamId: string | null;
  SysPersonTrainExam?: ISysPersonTrainExam;
}
export interface ISysPersonMedical {
  ID?: string | null;
  PersonId: null;
  Person?: ISysPerson;
  PersonMedicalBatcheId: null;
  PersonMedicalBatche?: ISysPersonMedicalBatche;
  Result: string | null;
  MedicalReportId: null;
  MedicalReport?: IFileAttachment
}
export interface ISysPersonMedicalBatche {
  ID?: string | null;
  BatchName: string | null;
  MedicalType: string | null;
  Hospital: string | null;
  MedicalDate: Date | null;
  Remark: string | null
}
export interface ISysPersonTrainBatche {
  ID?: string | null;
  TrainName: string | null;
  TrainStartDate: Date | null;
  TrainEndDate: Date | null;
  ExamDate: Date | null
}
export interface ISysPersonTrainExam {
  ID?: string | null;
  PersonId: null;
  Person?: ISysPerson;
  PersonTrainBatcheId: null;
  PersonTrainBatche?: ISysPersonTrainBatche;
  Score: string | null;
  ScoreReportId: null;
  ScoreReport?: IFileAttachment
}
export interface ISysHrOnboardingRequestBillVm {
  Entity: ISysHrOnboardingRequestBill;
  ActionName: string | null;
  IsMyApprove: boolean | null;
  Remark: string | null;
}

export interface ISysHrOnboardingRequestBillView extends ISysHrOnboardingRequestBill {
  ActionName?: string | null;
}

export interface ISysHrOnboardingRequestBillQuery {
  // 分页参数
  Limit?: number
  Page?: number

  // 基本信息查询
  StaffNo?: string
  Name?: string
  Gender?: number | string
  IdCardNo?: string
  Phone?: string
  Email?: string

  // 工作信息查询
  EmploymentType?: number | string
  ContractType?: number | string
  GroupId?: string
  JobPositionId?: string
  OrgId?: string

  // 单据信息查询
  BillCode?: string
  BillStatus?: number | string
  WorkflowStatus?: number | string
  Approver?: string
  ApprovalTime?: Date | Date[]

  // 入职相关查询
  ExpectedStartDate?: Date
  PersonMedicalId?: string
  SysPersonTrainExamId?: string

  // 时间范围查询
  HireDate?: Date
  BirthDate?: Date
}
